﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Three.BookStore.LoginERP;

namespace Three.BookStore.RBAC
{
    /// <summary>
    /// 角色管理接口
    /// </summary>
    public interface IRoles
    {
        /// <summary>
        /// 创建角色
        /// </summary>
        /// <param name="input">角色信息</param>
        /// <returns>创建后的角色信息</returns>
        Task<int> CreateAsync(RoleModel role);

        /// <summary>
        /// 更新角色
        /// </summary>
        /// <param name="id">角色ID</param>
        /// <param name="input">更新的角色信息</param>
        /// <returns>更新后的角色信息</returns>
        Task<int> UpdateAsync(RoleModel role);

        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="id">角色ID</param>
        Task<int> DeleteAsync(int id);

        /// <summary>
        /// 获取角色列表
        /// </summary>
        /// <returns>角色列表</returns>
        Task<List<RoleModel>> GetListAsync();
    }
}
